/*********************************************************************************************************
* Copyright (c),maxvision
* All rights reserved.
*
* 文件名称：mvPubApi.h
* 摘    要：公共api实现
* 当前版本：1.0
* 作    者：mv
* 完成日期：2024年1月
*********************************************************************************************************/
#ifndef __MVPUBAPI__H_
#define __MVPUBAPI__H_

#include "global_include.h"

static int m_iDevDirect = 0;

static int m_iCarWindowDetect = 0;

static int m_iTakeAwayCardTimeOut = 60;

static int m_iSwipeCardTimeOut = 120;

static std::string m_sChannelID = "";

static std::string m_sID = "5CE3F34B18636EB66C4D21DB";

static std::string m_sUnitId = "";

static std::string m_sPushIP = "";

static int m_iPushPort = 7085;

static std::string m_sPlatformIP = "";

static int m_iPlatformPort = 9088;

static char * m_localClientID = "192.168.20.136";

static std::string m_sPlatformInterface = "";
//static std::string m_s

std::vector<std::string> SplitString(const std::string& str, const std::string& delimiter, const bool trim_empty = true);

std::string TrimString(const std::string& str);

std::string getLocalIP();

char * getLocalClientID();

void setLocalClientID(std::string sClientIP);

std::string getLocalMacAddress();

std::string getCurrentTimestamp();

std::string getChannelID();

std::string getSessionID();

std::string readJsonConfig(const char* file_name);

bool open_config_file(Json::Reader &reader, Json::Value& root, std::ifstream& in, const char* file_name);

std::string getFileData(const std::string filePath);

bool fileExists(const std::string filePath);

bool fileDelete(const std::string filePath);
#endif